Support

Site Restoration

#16121 "Unexpected token { " on database restoration

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by nicholas on Monday, 20 May 2013 11:01 CDT

cpaschen
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)?Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: (2.5.11)
PHP version: (5.3.23)
MySQL version: (5.1.68)
Host: (SiteGround)
Akeeba Backup version which took the backup: (3.7.7 pro)
Kickstart version used to extract the backup: (3.6.0 pro)

NOTE: Backup is being send to Amazon S3 upon completion and restoring from there; however, also tried just backing up on the server and moving that file via ftp to new site and still get same error.

Description of my issue:

When attempting to restore the database I get the following error dialog:

Database restoration

An error occurred while restoring the database. The error message can be found below.
....
Unexpected token {
{"percent":0,"restored":0,"total":0,"eta":0,"error":"Invalid database key","done":1}{"percent":0,"restored":0,"total":"4 Kb","eta":"\u2013\u2013\u2013","error":"","done":0}

This backup file included a 2nd DB; however, I got similar error (unexpected token{) when I created a new backup with just the primary joomla db.
I've created new backup, re-run the configuration wizard on the main site and still keep getting same error.

Not sure where to look or what the specific problem is.

cpaschen
Just to clarify:

Old/Backup Site: HostGator VPS
New/Restore Site: SiteGround VPS

nicholas
Akeeba Staff
Manager
Do you have a file installation/sql/databases.ini extracted from your backup archive?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

cpaschen
Yes.

Here are the contents:

[0FD3BBD1-paschenn_livezilla.sql]
dbtype = "mysql"
dbname = "paschenn_livezilla"
sqlfile = "0FD3BBD1-paschenn_livezilla.sql"
dbhost = "localhost"
dbuser = "xxxxxxxxxxxxxxx"
dbpass = "xx}xxxxx(xxx)xx"
prefix = ""
parts = "4"
[joomla.sql]
dbtype = "mysql"
dbname = "paschenn_joomlam"
sqlfile = "joomla.sql"
dbhost = "localhost"
dbuser = "xxxxxxxxxxxxxxxxxxxxx"
dbpass = "xxxxxxxxxxxxxxxxxxxx"
prefix = "q0ter_"
parts = "14"


And I just noticed that the password for the database has a "}" in it.
Could that be the problem?
(Does akeeba not work if "}" is in one of those fields?

cpaschen
Although that doesn't explain the problem when just restoring the joomla-only backup.

However, that password has the following characters in the db password:

*%"l_&

I'm wondering if the double-quote might be causing a problem there.

Is there a list of characters that akeeba backup (or kickstart) doesn't support in db passwords?

nicholas
Akeeba Staff
Manager
I think the double quote screws up the restoration. ANGIE uses PHP's parse_ini_file whereas ABI was using a slower but more sane pure PHP INI parser. I think I just have to switch back to the good ol' trusted PHP-based parser.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

cpaschen
Yup ... it was the double-quotes.

I first tried just putting 'junk' in the password in that ini file (because I'm moving to a new server no need for the old pw); however, no matter what I did, it still was grabbing the originally restored db settings (maybe stored in memory?).

So I went back and just changed the pw on the original site (with only alpha-numeric chars) and then did a fresh backup and it worked fine.

So - as a work-around for anyone running into this right now - just change your passwords to not include the double-quote mark.

BTW ... I use a password generator and I remember back in J1.5 days that I almost always had to avoid the double-quote (using a generating rule) because of this limitation. I upgraded my password software and must have lost that in the rules. Putting it back in now.

Thanks for pointing me in the proper direction.

nicholas
Akeeba Staff
Manager
Thank you for the heads up! I had seen this issue before, but nobody had provided me with enough information to make sure that my hunch was correct. Now I know what I have to do to fix this :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!